#pragma once
#include <string>
#include <cstddef>
#include <odb/nullable.hxx>
#include <odb/core.hxx>

#pragma db object table("chat_session_member")
class ChatSessionMember
{
public:
    ChatSessionMember() {}
    ChatSessionMember(std::string& ssid, std::string& uid)
        :_session_id(ssid)
        ,_user_id(uid)
        {}
    ~ChatSessionMember(){}
    std::string session_id()
    {
        return _session_id;
    }
    void session_id(std::string ssid)
    {
        _session_id = ssid;
    }
    std::string user_id()
    {
        return _user_id;
    }
    void user_id(std::string user_id)
    {
        _user_id = user_id;
    }
private:
    //友元类
    friend class odb::access;
#pragma db id auto
    unsigned long _id;
#pragma db type("varchar(64)") index
    std::string _session_id;
#pragma db type("varchar(64)")
    std::string _user_id;
};
